/*
* https://leetcode.cn/problems/maximum-depth-of-binary-tree/
* 二叉树最大深度
* */
class  maxDepth {
    public int maxDepth(TreeNode root) {
        if(root==null){
            return 0;
        }
        int leftTree=maxDepth(root.left);
        int rightTree=maxDepth(root.right);
        return leftTree>rightTree?leftTree+1:rightTree+1;
    }
}